package com.aurora.source.util;

import android.content.Context;
import android.util.TypedValue;

/**
 * <pre>
 * author: 王伟
 * time:2017/07/31
 * desc:
 * <pre>
 */
public class DpPxUtil {
    public static int dp2px(Context context, int dp) {
        return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp,
                context.getResources().getDisplayMetrics());
    }
}
